package lxt.action.core;

import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.SessionAware;
import com.opensymphony.xwork2.ActionContext;

/**
 * 基础类，继承ActionSupport，并实现SessionAware接口
 * 以方便Action中获取http内置对象
 * @author 王夫东
 *
 */
public class ActionSupport extends com.opensymphony.xwork2.ActionSupport
		implements SessionAware {

	private static final long serialVersionUID = 1L;

	public void setSession(Map<String, Object> sessionMap) {

	}

	protected Map<String, Object> getSession() {
		return (Map<String, Object>) ActionContext.getContext().getSession();
	}

	protected HttpServletRequest getRequest() {
		return ServletActionContext.getRequest();
	}
}